package com.wowangz.cms.systemmanage.order.service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.wowangz.cms.common.utils.UUIDGenerator;
import com.wowangz.cms.syscore.exception.ServiceException;
import com.wowangz.cms.syscore.service.BaseService;
import com.wowangz.cms.systemmanage.channel.dto.ChannelInfo;
import com.wowangz.cms.systemmanage.channel.dto.GoodsInfo;
import com.wowangz.cms.systemmanage.channel.entity.Channel;
import com.wowangz.cms.systemmanage.channel.entity.ChannelPrice;
import com.wowangz.cms.systemmanage.order.entity.TblOrder;

public class OrderService extends BaseService {

	private Logger logger = LoggerFactory.getLogger(OrderService.class);
	
	/**
	 * 商家优惠销售情况分页查询总条数
	 * 
	 */
	public long findChannelOrderCount(HashMap<String, Object> map) throws ServiceException {
		try {
			Long countNum = this.getSqlSession().selectOne("Order.queryChannelOrderCount", map);
			return countNum;
		} catch (Exception e) {
			e.printStackTrace();
			throw new ServiceException(e.getMessage());
		}			
	}

	/**
	 * 商家优惠销售情况查询记录集合
	 * 
	 */
	public List<TblOrder> findChannelOrderList(HashMap<String, Object> map) throws ServiceException {
		try {
			List<TblOrder> list = this.getSqlSession().selectList("Order.queryChannelOrderPage", map);
			return list;
		} catch (Exception e) {
			e.printStackTrace();
			throw new ServiceException(e.getMessage());
		}		
	}
	
	
}
